﻿<UserControl x:Class="LearningGames.Framework.Quiz.MultiChoiceProblemPresenter"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style x:Key="ProblemStyle" TargetType="TextBlock">
            <Setter Property="FontSize" Value="40"/>
            <Setter Property="FontWeight" Value="Bold"/>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Border Margin="5" BorderBrush="Blue" BorderThickness="2" CornerRadius="4">
            <ContentPresenter Content="{Binding Problem}" ContentTemplate="{Binding DataTemplate}">
                <ContentPresenter.Resources>
                    <Style TargetType="TextBlock" BasedOn="{StaticResource ProblemStyle}" />
                </ContentPresenter.Resources>
            </ContentPresenter>
        </Border>
        <Border Margin="5" Grid.Row="1" BorderBrush="Blue" BorderThickness="2" CornerRadius="4">
            <ListBox ItemsSource="{Binding Choices}" >
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
            </ListBox>
        </Border>
    </Grid>
</UserControl>
